package justweb

import (
	"context"
)

type Server interface {
	Routerable //路由
	Start(address string) error
	Shutdown(ctx context.Context) error // 关闭
}

// 定义的handler对象要实现serveHTTP方法，还有实现Router方法
type Routerable interface {
	Route(method string, pattern string, handlerfunc HandlerFunc, filters ...string) error
}
